<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var i = 0;
			var j = 0;
			var c = [100,558,9,5,69,546];
			
			function e(v,g){
				return v - g
			}
			console.log(c.sort(e));
			i = c.sort(e).shift();
			j = c.sort(e).pop();
			
			alert("最小值：" + i + "        " + "最大值:" + j)
			document.write("最小值：" + i + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + "最大值:" + j)

</script>
	</body>
</html>
